pp108 : Implementing Custom Logic with Extension Classes

Implementing Custom Logic with Extension Classes

This topic describes the procedure to implement custom logic using extension classes generated in WS-AppServer.


In WS-AppServer, when Java code is generated and compiled it creates two Java class files for each model - Base ( <classname>Base ) and Extension ( <classname> ). To implement any custom logic, you have to do it in the Extension Java class. These are created within a folder by nameJava Archive <name of the package>.

  1. In the Workspace Documents (Explorer), open <solution> > <project> > Java Archive <package name> > com > <package name>, and double-click the generated extension class (<class>.java). The <class>.java window appears, displaying the code of the selected extension class.
  2. Append the custom logic to the existing code and save the file.

    Your custom logic is ready to be used in the WS-AppServer applications.

After you complete this task:
You need to validate the project to compile the modified Java code, so that it works during runtime.

Related reference

Creating and Using Composite Classes

Related information

Extending the Business Logic Using Custom Classes